﻿using Newtonsoft.Json;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace Domain.Models
{
    [DisplayName("账户")]
    public class Account : BaseEntity
    {
        [DisplayName("编号")]
        [Key]
        public int Id { get; set; }

        [DisplayName("账户")]
        [Required]
        [StringLength(20)]
        public string UserName { get; set; }

        [DisplayName("密码")]
        [Required]
        [StringLength(100)]
        public string Password { get; set; }

        [DisplayName("昵称")]
        [StringLength(200)]
        public string NickName { get; set; }

        [DisplayName("姓名")]
        [StringLength(200)]
        public string Name { get; set; }

        [DisplayName("账户权限")]
        public virtual ICollection<AccountRole> AccountRoles { get; set; } = new List<AccountRole>();

    }
}
